<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    15. 3Sum
   </h1>
   <p>
    Given an array
    <code>
     nums
    </code>
    of
    <em>
     n
    </em>
    integers, are there elements
    <em>
     a
    </em>
    ,
    <em>
     b
    </em>
    ,
    <em>
     c
    </em>
    in
    <code>
     nums
    </code>
    such that
    <em>
     a
    </em>
    +
    <em>
     b
    </em>
    +
    <em>
     c
    </em>
    = 0? Find all unique triplets in the array which gives the sum of zero.
   </p>
   <p>
    <strong>
     Note:
    </strong>
   </p>
   <p>
    The solution set must not contain duplicate triplets.
   </p>
   <p>
    <strong>
     Example:
    </strong>
   </p>
   <pre>
Given array nums = [-1, 0, 1, 2, -1, -4],

A solution set is:
[
  [-1, 0, 1],
  [-1, -1, 2]
]
</pre>
  </div>
  <div>
   <h1 class="question_title">
    15. 三数之和
   </h1>
   <p>
    给定一个包含
    <em>
     n
    </em>
    个整数的数组&nbsp;
    <code>
     nums
    </code>
    ，判断&nbsp;
    <code>
     nums
    </code>
    &nbsp;中是否存在三个元素
    <em>
     a，b，c ，
    </em>
    使得&nbsp;
    <em>
     a + b + c =
    </em>
    0 ？找出所有满足条件且不重复的三元组。
   </p>
   <p>
    <strong>
     注意：
    </strong>
    答案中不可以包含重复的三元组。
   </p>
   <pre>例如, 给定数组 nums = [-1, 0, 1, 2, -1, -4]，

满足要求的三元组集合为：
[
  [-1, 0, 1],
  [-1, -1, 2]
]
</pre>
  </div>
 </body>
</html>